fix: Add field aux to SignWithSchnorrArgument #573
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IC's interface documentation and examples repository both mention that the
sign_with_schnorr
function parameters contain anoptional aux
field when introducing the function.If this field is provided, the Taproot signature will be executed according to the BIP341 standard.
However, the
SignWithSchnorrArgument
structure in the ic-cdk crate did not have this field.For developers who rely on
ic-cdk
to callIC Managemet Canister
, it may cause difficulties in development.I encountered this problem today. I directly used the
sign_with_schnorr
interface ofic-cdk
to sign a bitcoin Taproot transaction, but when I broadcast the transaction, the bitcoin node always reported an error that the signature verification failed. After I consulted the official documentation and examples, it took a lot of time to solve this problem.So I think the
SignWithSchnorrArgument
structure should add thisoptional aux
field.IC Interface Doc : https://internetcomputer.org/docs/references/ic-interface-spec#ic-sign_with_schnorr
Example Repo : https://github.com/dfinity/examples/blob/master/rust/basic_bitcoin/src/basic_bitcoin/src/schnorr_api.rs